package com.ruoyi.labdata.domain;

import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.assertj.core.util.DateUtil;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.utils.DateUtils;

/**
 * 实验室是否可预约对象 lab_holiday_reservation
 *
 * @author jun.wang
 * @date 2022-04-15
 */
public class LabHolidayReservation extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	private Long dayId;

	private Integer year;
	
	private Integer weekNum;

	public Integer getWeekNum() {
		return weekNum;
	}

	public void setWeekNum(Integer weekNum) {
		this.weekNum = weekNum;
	}

	/**
	 * 日期
	 */
	@Excel(name = "日期")
	private String holidayDate;
	
	public String getDayName() throws ParseException{
		Date day = DateUtils.parseDateStrictly(this.holidayDate,"yyyy-MM-dd");
        String[] weeks = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
        Calendar c = Calendar.getInstance();
        c.setTime(day);
        int week_index = c.get(Calendar.DAY_OF_WEEK) - 1;
        if (week_index < 0) {
            week_index = 0;
        }
        return weeks[week_index];
	}

	/**
	 * 名称
	 */
	@Excel(name = "名称")
	private String holidayName;

	/**
	 * 节日标识(0-节假日 1-工作日)
	 */
	@Excel(name = "节日标识(0-节假日 1-工作日)")
	private String holidayFlag;

	/**
	 * 第一节
	 */
	@Excel(name = "第一节")
	private int sectionOne;

	/**
	 * 第二节
	 */
	@Excel(name = "第二节")
	private int sectionTwo;

	/**
	 * 第三节
	 */
	@Excel(name = "第三节")
	private int sectionThree;

	/**
	 * 第四节
	 */
	@Excel(name = "第四节")
	private int sectionFour;

	/**
	 * 第五节
	 */
	@Excel(name = "第五节")
	private int sectionFive;

	/**
	 * 第六节
	 */
	@Excel(name = "第六节")
	private int sectionSix;

	/**
	 * 第七节
	 */
	@Excel(name = "第七节")
	private int sectionSeven;

	/**
	 * 第八节
	 */
	@Excel(name = "第八节")
	private int sectionEight;

	/**
	 * 第九节
	 */
	@Excel(name = "第九节")
	private int sectionNine;

	/**
	 * 第十节
	 */
	@Excel(name = "第十节")
	private int sectionTen;

	/**
	 * 第十一节
	 */
	@Excel(name = "第十一节")
	private int sectionEleven;

	/**
	 * 第十二节
	 */
	@Excel(name = "第十二节")
	private int sectionTwelve;

	private List<String> workDateList;

	public List<String> getWorkDateList() {
		return workDateList;
	}

	public void setWorkDateList(List<String> workDateList) {
		this.workDateList = workDateList;
	}

	private Long classRoomId;

	public Long getClassRoomId() {
		return classRoomId;
	}

	public void setClassRoomId(Long classRoomId) {
		this.classRoomId = classRoomId;
	}

	public Long getDayId() {
		return dayId;
	}

	public void setDayId(Long dayId) {
		this.dayId = dayId;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public String getHolidayDate() {
		return holidayDate;
	}

	public void setHolidayDate(String holidayDate) {
		this.holidayDate = holidayDate;
	}

	public String getHolidayName() {
		return holidayName;
	}

	public void setHolidayName(String holidayName) {
		this.holidayName = holidayName;
	}

	public String getHolidayFlag() {
		return holidayFlag;
	}

	public void setHolidayFlag(String holidayFlag) {
		this.holidayFlag = holidayFlag;
	}

	public int getSectionOne() {
		return sectionOne;
	}

	public void setSectionOne(int sectionOne) {
		this.sectionOne = sectionOne;
	}

	public int getSectionTwo() {
		return sectionTwo;
	}

	public void setSectionTwo(int sectionTwo) {
		this.sectionTwo = sectionTwo;
	}

	public int getSectionThree() {
		return sectionThree;
	}

	public void setSectionThree(int sectionThree) {
		this.sectionThree = sectionThree;
	}

	public int getSectionFour() {
		return sectionFour;
	}

	public void setSectionFour(int sectionFour) {
		this.sectionFour = sectionFour;
	}

	public int getSectionFive() {
		return sectionFive;
	}

	public void setSectionFive(int sectionFive) {
		this.sectionFive = sectionFive;
	}

	public int getSectionSix() {
		return sectionSix;
	}

	public void setSectionSix(int sectionSix) {
		this.sectionSix = sectionSix;
	}

	public int getSectionSeven() {
		return sectionSeven;
	}

	public void setSectionSeven(int sectionSeven) {
		this.sectionSeven = sectionSeven;
	}

	public int getSectionEight() {
		return sectionEight;
	}

	public void setSectionEight(int sectionEight) {
		this.sectionEight = sectionEight;
	}

	public int getSectionNine() {
		return sectionNine;
	}

	public void setSectionNine(int sectionNine) {
		this.sectionNine = sectionNine;
	}

	public int getSectionTen() {
		return sectionTen;
	}

	public void setSectionTen(int sectionTen) {
		this.sectionTen = sectionTen;
	}

	public int getSectionEleven() {
		return sectionEleven;
	}

	public void setSectionEleven(int sectionEleven) {
		this.sectionEleven = sectionEleven;
	}

	public int getSectionTwelve() {
		return sectionTwelve;
	}

	public void setSectionTwelve(int sectionTwelve) {
		this.sectionTwelve = sectionTwelve;
	}

	
}
